package org.jeecgframework.web.service;

import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.CbsServiceEntity;
import org.jeecgframework.web.system.pojo.base.CbsServiceLogEntity;
import org.jeecgframework.web.system.pojo.base.ZyFileLogEntity;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface CbsServiceLogServiceI extends CommonService {

    <T> void delete(T entity);

    <T> Serializable save(T entity);

    <T> void saveOrUpdate(T entity);

    /**
     * 默认按钮-sql增强-新增操作
     *
     * @param id
     * @return
     */
    boolean doAddSql(CbsServiceLogEntity t);

    /**
     * 默认按钮-sql增强-更新操作
     *
     * @param id
     * @return
     */
    boolean doUpdateSql(CbsServiceLogEntity t);

    /**
     * 默认按钮-sql增强-删除操作
     *
     * @param id
     * @return
     */
    boolean doDelSql(CbsServiceLogEntity t);

    /**
     *  根据服务单id获取服务单所有日志
     */
    public List<Map<String, Object>> getServiceLog(String ServiceId);

    /**
     * 获取服务单处理描述附件信息
     * @return
     */
    public List<Map<String,Object>> getAllFileByCbsId(String ServiceId);

    /**
     * 添加日志
     */
    boolean addServiceLog(CbsServiceEntity cbsServiceId, Integer logType, String description, ZyFileLogEntity zyFileLogId);

    /**
     * 修改服务单日志为已发生拒绝
     * @param cbsServiceId
     */
    public void cbsServiceLog (String cbsServiceId);

    /**
     * 根据服务单id，获取非拒绝过的日志
     */
    public List<Map<String,Object>> getServiceLogOfTp(String ServiceId);
}
